home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 46 / Amiga Format CD46 (1999-10-20)(Future Publishing)(GB)[!][issue 1999-12].iso / -in_the_mag- / reader_requests / scilab / man / man-part1 / cat1 / boolean.1 < prev    next >
Text File  |  1999-09-16  |  896b  |  67 lines

  1.  
  2.  
  3.  
  4. boolean(1)                     Scilab Function                     boolean(1)
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11. NAME
  12.   "Scilab object: boolean"  - boolean variables and operators & | ~
  13.  
  14. DESCRIPTION
  15.   A boolean variable is %T (for "true") or %F (for "false").  These variables
  16.   can be used to define matrices of booleans, with the usual syntax. Boolean
  17.   matrices are manipulated as ordinary matrices with usual operations and
  18.   usual meaning (+, *, -, etc)
  19.  
  20.   ~b        : is the negation of boolean b (matrix).
  21.  
  22.   b1&b2     : is the logical and of b1 and b2 (matrices).
  23.  
  24.   b1|b2     : is the logical or of b1 and b2 (matrices).
  25.  
  26.   Boolean variables can be used for indexing matrices or vectors.
  27.             For instance a([%T,%F,%T],:) returns the submatrix made of rows 1
  28.             and 3 of a.
  29.  
  30. EXAMPLE
  31.   [1,2]==[1,3]
  32.   [1,2]==1
  33.   a=1:5; a(a>2)
  34.  
  35. SEE ALSO
  36.   matrices, | , & , ~, or, and.
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.